package branch_algorithm_study;

import java.util.Scanner;

public class Take_Apples {
    public static void main(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);
        int[] arr = {scanner.nextInt(), scanner.nextInt(),
                scanner.nextInt(), scanner.nextInt(),
                scanner.nextInt(), scanner.nextInt(),
                scanner.nextInt(), scanner.nextInt(),
                scanner.nextInt(), scanner.nextInt()};
        int height = scanner.nextInt();
        int max = height + 30;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] <= max) {
                count++;
            }
        }
        System.out.println(count);

    }
}
